<!-- 
<script type="text/html" template>
    <link rel="stylesheet" href="{{ layui.setter.base }}style/login.css?v={{ layui.admin.v }}-1" media="all">
</script>
<script type="text/html" id="homepageTpl" template > -->
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>综合数据收集服务管理系统</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="../../style/index.css" media="all">
</head>
<style>
    *{
        margin: 0;
        padding: 0;
    }
    body{
        background-image: url(../../../dist/style/res/user/bg-img.png);
        background-size: 100% 100%;
        background-repeat: no-repeat;
        background-position: top center;
        -ms-behavior: url(../../dist/style/res/backgroundsize.min.htc);
        behavior: url(../../dist/style/res/backgroundsize.min.htc);
    }
    .index-content{
        height: 100%;
        width: 100%;
    }
    .index-content .leftHover{
        width: 20px;
        height: 100%;
        left: 1px;
        position: fixed;
    }
    .index-content #treeBox{
        width: 100px;
        height: 100%;
        background: #10539b;
        position: fixed;
        left: -100px;
    }
    .index-content #treeBox ul>li{
        height: 90px;
        margin-top: 30px;
        cursor: pointer;
    }
    .index-content #treeBox ul>li>img{
        width: 60px;
        height: 60px;
        margin: 10px auto;
        padding: 0;
        display: block;
    }
    .index-content #treeBox ul>li>span{
        display: block;
        width: 100%;
        height: 18px;
        line-height: 18px;
        text-align: center;
        padding-bottom: 7px;
        color: #fff;
        font-size: 16px;
    }
    .index-content #treeBox ul>li .menu-child{
        position: relative;
        left: 100px;
        top: -95px;
        width: 137px;
        background-color: #134988;
        text-align: center;
        padding: 5px 0;
    }
    .index-content #treeBox ul>li .menu-child>div{
        height: 30px;
        margin-top: 5px;
    }
    .index-content #treeBox ul>li .menu-child>div>img{
        position: absolute;
        left: 10px;
        margin-top: 2px; 
    }
    .index-content #treeBox ul>li .menu-child>div>a{
        color: #fff;
        padding-left: 22px;
        text-decoration: none;
    }
    .index-content .headBox{
        height: 120px;
        width: 100%;
    }
    .index-content .title-box{
        height: 100%;
        width: 615px;
        margin: 0px auto;
        background-image: url(../../../dist/style/res/user/logoindex.png);
        background-repeat: no-repeat;
        background-position: center center;
        -ms-behavior: url(../../dist/style/res/backgroundsize.min.htc);
        behavior: url(../../dist/style/res/backgroundsize.min.htc);
    }
    .index-content .userContent{
        width: 270px;
        position: fixed;
        right: 10px;
        top: 18px;
        display: flex;
    }
    .index-content .user-icon{
        height: 45px;
        width: 100%;
        margin: 0px auto;
        background-image: url(../../../dist/style/res/user/user-h.png);
        background-repeat: no-repeat;
        background-position: center center;
        -ms-behavior: url(../../dist/style/res/backgroundsize.min.htc);
        behavior: url(../../dist/style/res/backgroundsize.min.htc);
    }
    .index-content .user-info{
        width: 100%;
    }
    .index-content .user-info>div{
        display: flex;
        color: #fff;
        line-height: 22px;
    }
    .index-content .user-info>div span{
        display: block;
        white-space: nowrap;
    }
    .index-content .user-logOut{
        height: 45px;
        width: 100%;
        margin: 0px auto;
        cursor: pointer;
        background-image: url(../../../dist/style/res/user/loginout.png);
        background-repeat: no-repeat;
        background-position: center center;
        -ms-behavior: url(../../dist/style/res/backgroundsize.min.htc);
        behavior: url(../../dist/style/res/backgroundsize.min.htc);
    }
    .index-content .modelBox{
        width: 66%;
        height: 276px;
        display: flex;
        margin: 20px auto;
        transition: height 0.5s, width 0.5s;
        -webkit-transition: height 0.5s, width 0.5s;
    }
    .index-content .modelBox>div:nth-child(odd){
        height: 200px;
        width: 290px;
        margin-left: 82px;
        margin-right: 100px;
        cursor: pointer;
        background-size: 100% 100%;
        background-image: url(../../../dist/style/res/user/2-bg.png);
        background-repeat: no-repeat;
        background-position: top center;
        -ms-behavior: url(../../dist/style/res/backgroundsize.min.htc);
        behavior: url(../../dist/style/res/backgroundsize.min.htc);
    }
    .index-content .modelBox>div:nth-child(even){
        height: 200px;
        width: 290px;
        margin-right: 100px;
        margin-left: 25px;
        cursor: pointer;
        background-size: 100% 100%;
        background-image: url(../../../dist/style/res/user/1-bg.png);
        background-repeat: no-repeat;
        background-position: top center;
        -ms-behavior: url(../../dist/style/res/backgroundsize.min.htc);
        behavior: url(../../dist/style/res/backgroundsize.min.htc);
    }
    .index-content .modelBox>div:nth-child(3n+0){
        height: 200px;
        width: 290px;
        margin: 0;
        cursor: pointer;
        background-size: 100% 100%;
        background-image: url(../../../dist/style/res/user/3-bg.png);
        background-repeat: no-repeat;
        background-position: top center;
        -ms-behavior: url(../../dist/style/res/backgroundsize.min.htc);
        behavior: url(../../dist/style/res/backgroundsize.min.htc);
    }
    .index-content .modelBox .num{
        width: 60%;
        margin: 32px auto 10px;
        color: #fff;
        font-weight: 100;
    }
    .index-content .modelBox .num>span:nth-child(1){
        font-size: 66px;
    }
    .index-content .modelBox .num>span:nth-child(2){
        font-size: 24px;
    }
    .index-content .modelBox .unit{
        font-size: 28px;
        color: #fff;
        width: 61%;
        letter-spacing: 1px;
        margin: 0px auto 0;
        font-weight: 100;
    }
    .hover{
        width:350px !important;
        height: 250px !important;
        animation: myMove 0.5s;
        -o-animation: myMove 0.5s;
    }
    .hover .num{
        margin: 59px auto 10px !important;
        animation: myMove2 1s;
        -o-animation: myMove2 1s;
    }
    .hover .num>span:nth-child(1){
        font-size: 80px !important;
        animation: myMove3 1s;
        -o-animation: myMove3 1s;
    }
    .hover .num>span:nth-child(2){
        font-size: 30px !important;
        animation: myMove4 1s;
        -o-animation: myMove4 1s;
    }
    .hover .unit{
        font-size: 34px !important;
        animation: myMove5 1s;
        -o-animation: myMove5 1s;
    }
    @keyframes myMove
    {
        0% {width:290px;height: 200px;}
        100% {width:350px;height: 250px}
    }
    @keyframes myMove2
    {
        0% {margin: 32px auto 10px;}
        100% {margin: 59px auto 10px;}
    }
    @keyframes myMove3
    {
        0% {font-size: 66px;}
        100% {font-size: 80px;}
    }
    @keyframes myMove4
    {
        0% {font-size: 24px;}
        100% {font-size: 30px;}
    }
    @keyframes myMove5
    {
        0% {font-size: 28px;}
        100% {font-size: 34px;}
    }
    .treeHover{
        left: 0px !important;
        animation: myTree 1s;
        -o-animation: myTree 1s;
    }
    .treeHover .menu-child{
        display: block;
    }
    @keyframes myTree
    {
        0% {left: -100px;}
        100% {left: 0px;}
    }
    .treeEnter{
        left: -100px !important;
        animation: myTree2 1s;
        -o-animation: myTree2 1s;
    }
    .treeEnter .menu-child{
        display: none;
    }
    @keyframes myTree2
    {
        0% {left: 0px;}
        100% {left: -100px;}
    }

    .index-content .marqueeBox{
        width: 55%;
        height: 502px;
        margin: 50px auto 0;
    }
    .index-content .marqueeBox .pop-box{
        display: none;
        height: 100%;
        width: 100%;
        background-image: url(../../../dist/style/res/user/pop.png);
        background-repeat: no-repeat;
        background-position: top center;
        -ms-behavior: url(../../dist/style/res/backgroundsize.min.htc);
        behavior: url(../../dist/style/res/backgroundsize.min.htc);
    }
    .index-content .marqueeBox .pop-box>div:nth-child(1){
        display: flex;
        width: 118px;
        margin: 0px auto 10px;
        padding-top: 68px;
    }
    .index-content .marqueeBox .pop-box>div:nth-child(2){
        display: flex;
        width: 118px;
        margin: 0px auto 10px;
        padding-top: 0px;
    }
    .index-content .marqueeBox .pop-box>div span:nth-child(1){
        color: #82FFEE;
        font-size: 40px;
        display: block;
        width: 70px;
        text-align: center;
    }
    .index-content .marqueeBox .pop-box>div span:nth-child(2){
        color: #82FFEE;
        font-size: 15px;
        padding-left: 10px;
        display: block;
        line-height: 55px;
        white-space: nowrap;
        text-align: center;
        width: 63px;
    }
    .index-content .marqueeBox .circleBox{
        display: none;
        height: 237px;
        width: 56%;
        margin: 0 auto;
        background-image: url(../../../dist/style/res/user/circle.png);
        background-repeat: no-repeat;
        background-position: top center;
        position: fixed;
        bottom: 102px;
    }
    .index-content .enterWeb{
        width: 55%;
        margin: 0 auto;
        color: #89fff8;
        text-align: center;
        position: fixed;
        bottom: 33px;
        font-size: 20px;
        letter-spacing: 2px;
        cursor: pointer;
        text-shadow: 2px 4px 6px #37ddee;
    }
</style>
<body>
    <div class="index-content layui-main">
        <div class="leftHover"></div>
        <div id="treeBox">
            <ul> 
                <li class="menu-index">
                    <img src="../../../../dist/style/res/menu/index.png"/>
                    <span>主页</span>
                </li>
                <li class="menu-task">
                    <img src="../../../../dist/style/res/menu/task.png"/>
                    <span>任务管理</span>
                </li>
                <li class="menu-fill">
                    <img src="../../../../dist/style/res/menu/fill.png"/>
                    <span>填报管理</span>
                </li>
                <li class="menu-audit">
                    <img src="../../../../dist/style/res/menu/audit.png"/>
                    <span>审核管理</span>
                </li>
                <li class="menu-data">
                    <img src="../../../../dist/style/res/menu/data.png"/>
                    <span>数据应用</span>
                </li>
                <li class="menu-system">
                    <img src="../../../../dist/style/res/menu/system.png"/>
                    <span>系统管理</span>
                </li>
            </ul>    
        </div>
        <div class="headBox">
            <div class="title-box"></div>
            <div class="layui-inline userContent">
                <div class="user-icon"></div>
                <div class="user-info">
                    <div>
                        <span>欢迎你:</span>
                        <span></span>
                    </div>
                    <div>
                        <span>部门:</span>
                        <span></span>
                    </div>
                </div>
                <div class="user-logOut"></div>
            </div>
        </div>
        <div class="modelBox">
        </div>
        <div class="marqueeBox">
            <div class="pop-box">
                <div>
                    <span>2</span>
                    <span>待填报</span>
                </div>
                <div>
                    <span>3</span>
                    <span>待审核</span>
                </div>
            </div>
            <div class="circleBox">
                <div class="wrapper horizontal demo1">
                    <ul class="container">
                        <li class="cards_list">
                            <div class="img">
                                <img src="../../../dist/style/res/user/di-hover.png" alt="">
                            </div>
                            <div class="main_con">
                                <img src="../../../dist/style/res/user/nofill.png"/>
                                <div>
                                    <p class="content">剩余时间</p>
                                    <p class="label"><span>4</span>小时</p>
                                </div> 
                            </div>
                            <div class="caption">人事数据统计任务</div>
                        </li>
                        <li class="cards_list">
                            <div class="img">
                                <img src="../../../dist/style/res/user/di-hover.png" alt="">
                            </div>
                            <div class="main_con">
                                <img src="../../../dist/style/res/user/nofill.png"/>
                                <div>
                                    <p class="content">剩余时间</p>
                                    <p class="label"><span>8</span>小时</p>
                                </div> 
                            </div>
                            <div class="caption">人事数据统计任务</div>
                        </li>
                        <li class="cards_list">
                            <div class="img">
                                <img src="../../../dist/style/res/user/di-hover.png" alt="">
                            </div>
                            <div class="main_con">
                                <img src="../../../dist/style/res/user/noaudi.png"/>
                                <div>
                                    <p class="content">剩余时间</p>
                                    <p class="label"><span>4</span>小时</p>
                                </div> 
                            </div>
                            <div class="caption">2018年气侯数据统计任务</div>
                        </li>
                        <li class="cards_list">
                            <div class="img">
                                <img src="../../../dist/style/res/user/di-hover.png" alt="">
                            </div>
                            <div class="main_con">
                                <img src="../../../dist/style/res/user/noaudi.png"/>
                                <div>
                                    <p class="content">剩余时间</p>
                                    <p class="label"><span>4</span>小时</p>
                                </div> 
                            </div>
                            <div class="caption">2018年气侯数据统计任务</div>
                        </li>
                        <li class="cards_list">
                            <div class="img">
                                <img src="../../../dist/style/res/user/di-hover.png" alt="">
                            </div>
                            <div class="main_con">
                                <img src="../../../dist/style/res/user/noaudi.png"/>
                                <div>
                                    <p class="content">剩余时间</p>
                                    <p class="label"><span>4</span>小时</p>
                                </div> 
                            </div>
                            <div class="caption">2018年气侯数据统计任务</div>
                        </li>
                    </ul>
                    <i class="btn-direct btn-left">
                        <span class="shift-left"></span>
                    </i>
                    <i class="btn-direct btn-right">
                        <span class="shift-right"></span>
                    </i>
                </div>
            </div>
            <div class="enterWeb">
                <p>进入应用 > ></p>
            </div>
        </div>
    </div>
    <script src="../../../start/layui/layui.js"></script>
    <script src="../../../start/plugin/zTree/js/jquery-1.7.2.min.js"></script>
    <script src="../../controller/carousel.js"></script>
    <script>
        $(function(){
            var carousel1=null;
            var clickId=null;
            var myapi="http://192.168.9.12:8888";
            var userdata = JSON.parse(sessionStorage.getItem("userdata"));
            $(".user-info>div:eq(0)").find("span").eq(1).html(userdata.login_name);
            $(".user-info>div:eq(1)").find("span").eq(1).html(userdata.dept_name);
            //初始化待办任务
           onreadydata();

            function onreadydata(){
                $.ajax({
                    type:"post",
                    url: myapi+'/DC/api/rest/web/custom/GetAppByUser',
                    data: {
                        access_token: userdata.user_code
                    },
                    success: function(res){
                        if(res.retcode=="0"){
                            var data = res.data;
                            var div ="";
                            for(var i=0;i<data.length;i++){
                                div += "<div class='model-div' id='"+data[i].app_id+"'>";
                                div += "<div class='num'>"
                                div += "<span>"+data[i].count+"</span>"
                                div += "<span>待办</span>"
                                div += "</div>"
                                div += "<div class='unit'>"+data[i].app_name+"</div>"
                                div += "</div>"
                            }
                            $(".index-content .modelBox").empty().append(div);
                            $(".index-content .modelBox>div").css("margin","0 auto");

                            loadInitData(data[0].app_id);
                        }
                    },
                    error: function(){
                        console.log('接口失败')
                    }
                })
            }

            function loadInitData(id){
                clickId = id;
                $.ajax({
                    type:"post",
                    url: myapi+'/DC/api/rest/web/custom/GetTasksByUserApp',
                    data: {
                        app_id:clickId,
                        access_token: userdata.user_code
                    },
                    success: function(res){
                        if(res.retcode=="0"){
                            var data = res.data;
                            var writeCount = data.writeCount;//待填报的任务数量
                            var writeTask = data.writeTask;//待填报的任务列表
                            var auditCount = data.auditCount;//待审核的任务数量
                            var auditTask = data.auditTask;//待审核的任务列表
                            
                            $(".index-content .marqueeBox").find("span").eq(0).html(writeCount);//填报
                            $(".index-content .marqueeBox").find("span").eq(2).html(auditCount);//审核
                            var task ="";
                            for(var i=0;i<writeTask.length;i++){
                                task += "<li class='cards_list' id='"+writeTask[i].app_id+"' url='"+writeTask[i].connection+"'>"
                                task += "<div class='img'>"
                                task += "<img src='../../../dist/style/res/user/di-hover.png' alt=''>"
                                task += "</div>"
                                task += "<div class='main_con'>"
                                task += "<img src='../../../dist/style/res/user/nofill.png'/>"
                                task += "<div>"
                                task += "<p class='content'>剩余时间</p>"
                                task += "<p class='label'><span>"+writeTask[i].remaintime+"</span></p>"
                                task += "</div>"
                                task += "</div>"
                                task += "<div class='caption'>"+writeTask[i].taskname+"</div>"
                                task += "</li>"
                            }          
                            for(var i=0;i<auditTask.length;i++){
                                task += "<li class='cards_list' id='"+auditTask[i].app_id+"' url='"+auditTask[i].connection+"'>"
                                task += "<div class='img'>"
                                task += "<img src='../../../dist/style/res/user/di-hover.png' alt=''>"
                                task += "</div>"
                                task += "<div class='main_con'>"
                                task += "<img src='../../../dist/style/res/user/nofill.png'/>"
                                task += "<div>"
                                task += "<p class='content'>剩余时间</p>"
                                task += "<p class='label'><span>"+auditTask[i].remaintime+"</span></p>"
                                task += "</div>"
                                task += "</div>"
                                task += "<div class='caption'>"+auditTask[i].taskname+"</div>"
                                task += "</li>"
                            }          

                            $(".index-content .wrapper ul").empty().append(task);

                            $(".index-content .marqueeBox .pop-box").css("display","block");
                            $(".index-content .marqueeBox .circleBox").css("display","block");

                            $("div.wrapper").each(function (i, e) {
                                $(e).attr("ondragstart", "return false");
                            });

                            //轮播设置
                            var $demo1 = $(".demo1");
                            carousel1 = new Carousel($demo1.children("ul.container"), {
                                opacity: .9,
                                scale: [.9],
                                transition: "300ms",
                                isClickCard: true,
                                switchBtn: $demo1.children("i.btn-direct"),
                                isAuto: true,
                                interval: 3000
                            });
                        }
                    },
                    error: function(){
                        console.log('接口失败')
                    }
                })
            }

            $('.index-content .modelBox').delegate('.model-div','mouseenter', function(e) {//绑定鼠标进入事件
                e.stopPropagation;
                $(this).addClass('hover');
            });
            $('.index-content .modelBox').delegate('.model-div','mouseleave', function(e) {//绑定鼠标划出事件
                e.stopPropagation;
                $(this).removeClass('hover');
            });

            //移入树
            $('.index-content .leftHover').hover(function() {
                $("#treeBox").addClass('treeHover');
                $("#treeBox").removeClass('treeEnter');
            });
            
            $('.index-content #treeBox').hover(function(e) {
               e.stopPropagation;
            }, function() {
                $("#treeBox").addClass('treeEnter')
                $("#treeBox").removeClass('treeHover')
            });

            //进入系统
            $(".index-content .enterWeb").on("click",function(){
                var id = clickId;
                $.ajax({
                    type:"get",
                    url: myapi+'/DC/api/rest/web/custom/setApp',
                    dataType: 'jsonp',
                    data: {
                        app_id:id,
                        access_token: userdata.user_code
                    },
                    success: function(res){
                        if(res.retcode === '访问成功') {
                            window.location.href = "/start/index.html#/";
                        }else {
                            alert('访问失败');
                            window.location.href = "/start/index.html#/user/login";
                        }
                    }
                })
            })

            $('.index-content #treeBox ul>li').hover(function() {
                $(this).siblings().find(".menu-child").css("display","none");
                var $li = $(this).find("span").html();
                var text ="";
                if($li=="主页"){
                    text += "<div class='menu-child'>"
                    text += "<div><img src='../../../../dist/style/res/user/system-ic.png'/>"
                    text += "<a href='/start/index.html#/'>控制台</a></div>"
                    text += "</div>"
                }else if($li=="任务管理"){
                    text += "<div class='menu-child'>"
                    text += "<div><img src='../../../../dist/style/res/user/task-iic.png'/>"
                    text += "<a href='/start/index.html#/task/temporary/'>临时任务</a></div>"
                    text += "<div><img src='../../../../dist/style/res/user/task-iic.png'/>"
                    text += "<a href='/start/index.html#/task/permanent/'>常驻任务</a></div>"
                    text += "<div><img src='../../../../dist/style/res/user/task-iic.png'/>"
                    text += "<a href='/start/index.html#/system/systemManage'>表单库</a></div>"
                    text += "</div>"
                }else if($li=="填报管理"){
                    text += "<div class='menu-child'>"
                    text += "<div><img src='../../../../dist/style/res/user/fill-ic.png'/>"
                    text += "<a href='/start/index.html#/fill/formFill'>任务填报</a></div>"
                    text += "</div>"
                }else if($li=="审核管理"){
                    text += "<div class='menu-child'>"
                    text += "<div><img src='../../../../dist/style/res/user/audit-ic.png'/>"
                    text += "<a href='/start/index.html#/audit/dataReview'>数据审核</a></div>"
                    text += "<div><img src='../../../../dist/style/res/user/audit-ic.png'/>"
                    text += "<a href='/start/index.html#/audit/taskReview'>任务审核</a></div>"
                    text += "</div>"
                }else if($li=="数据应用"){
                    text += "<div class='menu-child'>"
                    text += "<div><img src='../../../../dist/style/res/user/data-ic.png'/>"
                    text += "<a href='/start/index.html#/data/dataSerach'>数据查询</a></div>"
                    text += "</div>"
                }else if($li=="系统管理"){
                    text += "<div class='menu-child'>"
                    text += "<div><img src='../../../../dist/style/res/user/system-ic.png'/>"
                    text += "<a href='/start/index.html#/system/roles/rolesManage'>角色人员设置</a></div>"
                    text += "<div><img src='../../../../dist/style/res/user/system-ic.png'/>"
                    text += "<a href='/start/index.html#/system/magSet/managerSet'>管理员设置</a></div>"
                    text += "<div><img src='../../../../dist/style/res/user/system-ic.png'/>"
                    text += "<a href='/start/index.html#/system/group/groupMaintenance'>群组维护</a></div>"
                    text += "</div>"
                }        
                $(this).find("span").nextAll().remove();
                $(this).append(text);        
            }, function() {
            });

            //注销
            $(".index-content .user-logOut").click(function(){
                location.href = "/start/index.html#/user/login";
            })

            //点击模块
            $(".index-content .modelBox").delegate(".model-div","click",function(e){
                e.stopPropagation;
                var app_id = $(this).attr("id")
                clickId = app_id;
                $.ajax({
                    type:"post",
                    url: myapi+'/DC/api/rest/web/custom/GetTasksByUserApp',
                    data: {
                        app_id:app_id,
                        access_token: userdata.user_code
                    },
                    success: function(res){
                        if(res.retcode=="0"){
                            var data = res.data;
                            var writeCount = data.writeCount;//待填报的任务数量
                            var writeTask = data.writeTask;//待填报的任务列表
                            var auditCount = data.auditCount;//待审核的任务数量
                            var auditTask = data.auditTask;//待审核的任务列表
                            
                            $(".index-content .marqueeBox").find("span").eq(0).html(writeCount);//填报
                            $(".index-content .marqueeBox").find("span").eq(2).html(auditCount);//审核
                            var task ="";
                            for(var i=0;i<writeTask.length;i++){
                                task += "<li class='cards_list' id='"+writeTask[i].app_id+"' url='"+writeTask[i].connection+"'>"
                                task += "<div class='img'>"
                                task += "<img src='../../../dist/style/res/user/di-hover.png' alt=''>"
                                task += "</div>"
                                task += "<div class='main_con'>"
                                task += "<img src='../../../dist/style/res/user/nofill.png'/>"
                                task += "<div>"
                                task += "<p class='content'>剩余时间</p>"
                                task += "<p class='label'><span>"+writeTask[i].remaintime+"</span></p>"
                                task += "</div>"
                                task += "</div>"
                                task += "<div class='caption'>"+writeTask[i].taskname+"</div>"
                                task += "</li>"
                            }          
                            for(var i=0;i<auditTask.length;i++){
                                task += "<li class='cards_list' id='"+auditTask[i].app_id+"' url='"+auditTask[i].connection+"'>"
                                task += "<div class='img'>"
                                task += "<img src='../../../dist/style/res/user/di-hover.png' alt=''>"
                                task += "</div>"
                                task += "<div class='main_con'>"
                                task += "<img src='../../../dist/style/res/user/nofill.png'/>"
                                task += "<div>"
                                task += "<p class='content'>剩余时间</p>"
                                task += "<p class='label'><span>"+auditTask[i].remaintime+"</span></p>"
                                task += "</div>"
                                task += "</div>"
                                task += "<div class='caption'>"+auditTask[i].taskname+"</div>"
                                task += "</li>"
                            }          

                            $(".index-content .wrapper ul").empty().append(task);

                            $(".index-content .marqueeBox .pop-box").css("display","block");
                            $(".index-content .marqueeBox .circleBox").css("display","block");

                            $("div.wrapper").each(function (i, e) {
                                $(e).attr("ondragstart", "return false");
                            });

                            //轮播设置
                            var $demo1 = $(".demo1");
                            carousel1 = new Carousel($demo1.children("ul.container"), {
                                opacity: .9,
                                scale: [.9],
                                transition: "300ms",
                                isClickCard: true,
                                switchBtn: $demo1.children("i.btn-direct"),
                                isAuto: true,
                                interval: 3000
                            });
                        }
                    },
                    error: function(){
                        console.log('接口失败')
                    }
                })
            })

            //点击任务
            $(".index-content .circleBox ul").delegate("li","click",function(e){
                var url = $(this).attr("url");
                var id = $(this).attr("id");
                $.ajax({
                    type:"post",
                    url: myapi+'/DC/api/rest/web/custom/setApp',
                    data: {
                        app_id:id,
                        access_token: userdata.user_code
                    },
                    success: function(res){
                        
                    }
                })
                window.location.href = "/start/index.html#/"+url;
            })
        })
    </script>
</body>